<template>
	<view>
		<view class="content">请描述具体问题</view>
		<view class="input_box">
			<textarea placeholder="请输入您的意见,感谢您的反馈!" class="textarea border" v-model="form.content" ></textarea>
		</view>
		<view class="content">联系方式(选填)</view>
		<view class="box">
			<input type="text" placeholder="请输入您的邮箱" class="text border" v-model="form.connect" />
		</view>
		<button @click="plusAdd" class="submit" type="primary">提交</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				form:{
					"content":"",
					"connect":"",
				},
			}
		},
		methods: {
			plusAdd(){
				console.log(this.form)
				uni.request({
					header: {
						'Content-Type': 'application/json'  
					}, 
					url:'https://hotenergy.club/workapp/feedback/add', 
					method: 'POST',
					data: {
						contactInfo:this.form.connect,
						conten:this.form.content,						   
						},
					success: (res) => {
						console.log(res);
						uni.showToast({
							title:"谢谢您的宝贵意见！",
						})
						this.form={"content":"","connect":"",}
					} 
				})
			},
		}
	}
</script>

<style>
.content{
	margin: 30rpx 0 25rpx 25rpx;
}
.input_box{
	margin: 15rpx 25rpx 25rpx 25rpx;
	border-radius: 15rpx;
	border: 1px solid #e6e6e6;
	padding: 5%;
}
.box{
	margin: 15rpx 25rpx 25rpx 25rpx;
	border-radius: 15rpx;
	border: 1px solid #e6e6e6;
	height: 70rpx;
	padding-left: 5%;
	padding-top:17rpx;
}
.submit{
	width: 400rpx;
	margin-left: 175rpx;
	margin-top: 70rpx;
	background-color: #666FFC !important;
}
</style>
